<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>Document</title>
    <link rel="stylesheet" href="/css/reset.css">
    <link rel="stylesheet" href="/css/base.css">
    <link rel="stylesheet" href="/css/swiper.min.css">
    <link rel="stylesheet" href="/css/banner.css">
    <script src="js/swiper.min.js"></script>
    <script>
        var docEl = document.documentElement
        docEl.style.fontSize = (docEl.clientWidth / 750 * 100) + 'px'
    </script>
</head>
<body>
    <div class="content">
        <div class="banner">
            <div class="swiper-container swiper-container-detail_banner">
                <div class="swiper-wrapper swiper-wrapper-detail">
                    <div class="swiper-slide">
                        <img src="/img/banner-1.png" width="100%">
                    </div>
                    <div class="swiper-slide">
                        <img src="/img/banner-2.png" width="100%">
                    </div>
                </div>
                <div class="swiper-pagination_banner"></div>
            </div>
        </div>
        <div class="time" id="time">3s</div>
    </div>
    <script>
        var swiper_banner = new Swiper('.swiper-container-detail_banner', {
            speed: 300,
            on: {
                slideChange: function() {
                    
                }
            },
            pagination: {
                el: '.swiper-pagination_banner',
            }
        })

        // 倒计时
        var timeLeft = 3
        function setTime() {
            setTimeout(() => {
                timeLeft -= 1
                document.getElementById('time').innerText = timeLeft + 's'
                if (timeLeft > 0) {
                    setTime()
                } else {
                    location.href = '/'
                }
            }, 1000)
        }
        window.onload = function() {
            setTime()
        }
    </script>
</body>
</html>